package com.quanyan.assets.mapper;

import com.quanyan.assets.entity.TbUserAssets;
import com.quanyan.assets.request.ReqBatchAddEgg;
import com.quanyan.assets.request.ReqCoupon;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ETbUserAssetsMapper {
    //正常消费或获得积分
    int updateEffectiveAccumulate(@Param("uid")Integer uid,@Param("assetsType") Byte assetsType,@Param("accumulate") long accumulate);
    //冻结积分
    int updateFreezeAccumulate(@Param("uid")Integer uid,@Param("assetsType") Byte assetsType,@Param("accumulate") long accumulate);
    //解冻积分
    int updateUnfreezeAccumulate(@Param("uid")Integer uid,@Param("assetsType") Byte assetsType,@Param("accumulate") long accumulate,@Param("status") long status);
    //冻结优惠券
    int updateFreezeCoupon(@Param("uid")Integer uid,@Param("assetsType") Byte assetsType);

    int updateUnfreezeCoupon(ReqCoupon reqCoupon);

    //扣减优惠券可用数量
    int updateUseableAmount(@Param("uid") Integer uid, @Param("coupon") Integer coupon);

    //添加优惠券可用数量
    int updateAddUseableAmount(@Param("uid") Integer uid, @Param("coupon") Integer coupon);

    //获取资产信息
    TbUserAssets getUserAssets(@Param("uid") Integer uid, @Param("assetsType") Integer assetsType);

    void batchAddEggClub(List<ReqBatchAddEgg> reqBatchAddEggList);
}